# -*- mode: snippet -*-
# name: future_map from furrr
# key: future_map@furrr
# contributor: Shuguang Sun
# --
library(furrr)

prev_plan <- plan(multiprocess(workers = parallel::detectCores()))
res <- future_map(${1:list}, function(${2:arg}) {
  ${3:body}
}, .progress = ${4:TRUE})
future::plan(prev_plan)

$0